package com.quantum.util
{

	public class ClassUtils
	{

		public static function getSimpleClassName(qualifiedName:String):String
		{
			if (StringUtils.isEmpty(qualifiedName))
			{
				return qualifiedName;
			}
			var normalized:String=getNormalizeClassName(qualifiedName);
			var parts:Array=normalized.split(".");
			return parts[parts.length - 1];
		}

		/**
		 * Replaces :: by . in the given qualified AS class name.
		 */
		public static function getNormalizeClassName(name:String):String
		{
			if (StringUtils.isEmpty(name))
			{
				return name;
			}
			return name.replace("::", ".");
		}
	}
}